<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AdolescentPassword extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('adolescent_password', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('用户ID');
            $table->string('password', 10);
            $table->dateTime('created_at');
            $table->unique('user_id', 'user_id');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('adolescent_password');
    }
}
